Ext.define('Jason.view.main.Head', {
    extend: 'Ext.container.Container',
    xtype: 'app-header',
    padding: '0 20',
    cls: 'app-header',
    height: 52,
    requires:[
    	'Wys.menu.CustomMenu'
    ],
    bind:{
        style:{
            backgroundColor:'{topToolbarBkc}'
        }
    },
    layout: {
        type: 'hbox',
        pack: 'start',
        align: 'center'
    },
    items: [{
        xtype: 'container', style: 'cursor: pointer;', reference: 'apps',
        bind:{
            hidden :'{!showLogo}'
        },
        listeners: {
            el: {
                mouseover: function (container, e, eOpts) { }
            }
        },
        html: '<svg t="1635912450992" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2400" width="24" height="24"><path d="M327.68 204.8h-81.92c-22.528 0-40.96 18.432-40.96 40.96v81.92c0 22.528 18.432 40.96 40.96 40.96h81.92c22.528 0 40.96-18.432 40.96-40.96v-81.92c0-22.528-18.432-40.96-40.96-40.96z m225.28 0h-81.92c-22.528 0-40.96 18.432-40.96 40.96v81.92c0 22.528 18.432 40.96 40.96 40.96h81.92c22.528 0 40.96-18.432 40.96-40.96v-81.92c0-22.528-18.432-40.96-40.96-40.96z m225.28 0h-81.92c-22.528 0-40.96 18.432-40.96 40.96v81.92c0 22.528 18.432 40.96 40.96 40.96h81.92c22.528 0 40.96-18.432 40.96-40.96v-81.92c0-22.528-18.432-40.96-40.96-40.96zM327.68 430.08h-81.92c-22.528 0-40.96 18.432-40.96 40.96v81.92c0 22.528 18.432 40.96 40.96 40.96h81.92c22.528 0 40.96-18.432 40.96-40.96v-81.92c0-22.528-18.432-40.96-40.96-40.96z m225.28 0h-81.92c-22.528 0-40.96 18.432-40.96 40.96v81.92c0 22.528 18.432 40.96 40.96 40.96h81.92c22.528 0 40.96-18.432 40.96-40.96v-81.92c0-22.528-18.432-40.96-40.96-40.96z m225.28 0h-81.92c-22.528 0-40.96 18.432-40.96 40.96v81.92c0 22.528 18.432 40.96 40.96 40.96h81.92c22.528 0 40.96-18.432 40.96-40.96v-81.92c0-22.528-18.432-40.96-40.96-40.96zM327.68 655.36h-81.92c-22.528 0-40.96 18.432-40.96 40.96v81.92c0 22.528 18.432 40.96 40.96 40.96h81.92c22.528 0 40.96-18.432 40.96-40.96v-81.92c0-22.528-18.432-40.96-40.96-40.96z m225.28 0h-81.92c-22.528 0-40.96 18.432-40.96 40.96v81.92c0 22.528 18.432 40.96 40.96 40.96h81.92c22.528 0 40.96-18.432 40.96-40.96v-81.92c0-22.528-18.432-40.96-40.96-40.96z m225.28 0h-81.92c-22.528 0-40.96 18.432-40.96 40.96v81.92c0 22.528 18.432 40.96 40.96 40.96h81.92c22.528 0 40.96-18.432 40.96-40.96v-81.92c0-22.528-18.432-40.96-40.96-40.96z" p-id="2401" fill="#ffffff"></path></svg>'
    }, {
        xtype: 'container',
        itemId: 'sysTitle',
        html: '<span class="sysTitle" style="font-weight:'+(cfg.isSysNameBold?"bold":"none")+';">' + cfg.systemname + "&nbsp;&nbsp;&nbsp;&nbsp;</span>",
        listeners: {
            el: {
                click: function () { window.location.reload(); }
            }
        }
    },{
        xtype : 'container',bind:{hidden: '{isToolbarMenu}'},flex:1
    }, {
        xtype: 'container',
        flex: 1,
        style: {
            borderLeft: '1px solid rgba(0,0,0,.08);',
            height: '51px',
            display: 'inline'/*,
            overflow: 'hidden',
            overflowX: 'auto'*/
        },
        height:51,
        bind:{
            hidden: '{!isToolbarMenu}'
        },
        padding: '0 0 0 15',
        items: {
            xtype: 'customMenu',
            flex: 1,
            fixed:true,
            listeners: {
                render: 'onTopMenuReady'
            }
        }
    }, {
        xtype: 'container', width: 26, margin: '0 6',
        style: 'cursor: pointer;', reference: 'fullScreen',
        listeners: {
            el: {
                click: 'onEnabledFullScreen',
                mouseover:function(container){
                	Ext.create('Ext.tip.ToolTip', {
					    target: container.parentEvent.target,
					    html: I18N.FullScreenMsg
					})
                }
            }
        },
        html: '<svg t="1635911535728" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2411" width="24" height="24"><path d="M290 236.4l43.9-43.9c4.7-4.7 1.9-12.8-4.7-13.6L169 160c-5.1-0.6-9.5 3.7-8.9 8.9L179 329.1c0.8 6.6 8.9 9.4 13.6 4.7l43.7-43.7L370 423.7c3.1 3.1 8.2 3.1 11.3 0l42.4-42.3c3.1-3.1 3.1-8.2 0-11.3L290 236.4zM642.7 423.7c3.1 3.1 8.2 3.1 11.3 0l133.7-133.6 43.7 43.7c4.7 4.7 12.8 1.9 13.6-4.7L863.9 169c0.6-5.1-3.7-9.5-8.9-8.9L694.8 179c-6.6 0.8-9.4 8.9-4.7 13.6l43.9 43.9L600.3 370c-3.1 3.1-3.1 8.2 0 11.3l42.4 42.4zM845 694.9c-0.8-6.6-8.9-9.4-13.6-4.7l-43.7 43.7L654 600.3c-3.1-3.1-8.2-3.1-11.3 0l-42.4 42.3c-3.1 3.1-3.1 8.2 0 11.3L734 787.6l-43.9 43.9c-4.7 4.7-1.9 12.8 4.7 13.6L855 864c5.1 0.6 9.5-3.7 8.9-8.9L845 694.9zM381.3 600.3c-3.1-3.1-8.2-3.1-11.3 0L236.3 733.9l-43.7-43.7c-4.7-4.7-12.8-1.9-13.6 4.7L160.1 855c-0.6 5.1 3.7 9.5 8.9 8.9L329.2 845c6.6-0.8 9.4-8.9 4.7-13.6L290 787.6 423.7 654c3.1-3.1 3.1-8.2 0-11.3l-42.4-42.4z" p-id="2412" fill="#ffffff"></path></svg>'

    }, {
        xtype: 'container', width: 26,
        style: 'cursor: pointer;', reference: 'settings',
        hidden: true,
        listeners: {
            el: {
                click: 'onEnabledSettings'
            }
        },
        html: '<svg t="1640861102422" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2137" width="24" height="24"><path d="M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56c10.1-8.6 13.8-22.6 9.3-35.2l-0.9-2.6c-18.1-50.5-44.9-96.9-79.7-137.9l-1.8-2.1c-8.6-10.1-22.5-13.9-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85c-2.4-13.1-12.7-23.3-25.8-25.7l-2.7-0.5c-52.1-9.4-106.9-9.4-159 0l-2.7 0.5c-13.1 2.4-23.4 12.6-25.8 25.7l-15.8 85.4c-35.9 13.6-69.2 32.9-99 57.4l-81.9-29.1c-12.5-4.4-26.5-0.7-35.1 9.5l-1.8 2.1c-34.8 41.1-61.6 87.5-79.7 137.9l-0.9 2.6c-4.5 12.5-0.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5c-10.1 8.6-13.8 22.6-9.3 35.2l0.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1c8.6 10.1 22.5 13.9 35.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4c2.4 13.1 12.7 23.3 25.8 25.7l2.7 0.5c26.1 4.7 52.8 7.1 79.5 7.1 26.7 0 53.5-2.4 79.5-7.1l2.7-0.5c13.1-2.4 23.4-12.6 25.8-25.7l15.7-85c36.2-13.6 69.7-32.9 99.7-57.6l81.3 28.9c12.5 4.4 26.5 0.7 35.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l0.9-2.6c4.5-12.3 0.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9c-11.3 26.1-25.6 50.7-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97c-28.1 3.2-56.8 3.2-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9z" p-id="2138" fill="#ffffff"></path><path d="M512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176z m79.2 255.2C570 602.3 541.9 614 512 614c-29.9 0-58-11.7-79.2-32.8C411.7 560 400 531.9 400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8C612.3 444 624 472.1 624 502c0 29.9-11.7 58-32.8 79.2z" p-id="2139" fill="#ffffff"></path></svg>'
    }, {
        xtype: 'image', margin: '0 6',
        cls: 'header-right-profile-image',
        width: 24,
        style: 'cursor: pointer;width:24px;height:24px;',
        reference: 'userProfile',
        hidden: true,
        listeners: {
            el: {
                click: 'onShowSetting'
            }
        },
        alt: 'current user image',
        src: 'resources/images/user-profile/defaults.png'
    }, {
        xtype: 'container',
        reference: 'userProfile2',
        hidden: true,
        listeners: {
            el: {
                click: 'onShowSetting'
            }
        },
        margin: '0 0 0 6',
        bind: { html: '{loginedProfile}' }
    }]
});